//
//  PGModalViewController.m
//  Modal
//
//  Created by 彭鹏 on 16/10/22.
//  Copyright © 2016年 pengpeng. All rights reserved.
//

#import "PGModalViewController.h"
#import "ModalView.h"
@interface PGModalViewController ()

@end

@implementation PGModalViewController

- (void)loadView {
    [super loadView];
    self.view = [[ModalView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    
    
}


- (void)viewDidLoad{
    [super viewDidLoad];
    NSLog(@"%zd",self.vc.childViewControllers.count);
}


- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    NSLog(@"%@",[UIApplication sharedApplication].keyWindow.rootViewController);
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)dealloc {
    NSLog(@"PGModalViewController   dealloc");
}


@end
